<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="维修列表" bodyClass="gray-bg animated fadeInRight" isAnimation="false" libs=["table","zTree","layout-latest"]/>
<div class="container-div">
 <div class="row">
  <div class="col-sm-12 search-collapse">
    <@form.form id="maintenance-form" class="form-inline">
     <div class="select-list">
      <ul>
           <li>
              <label> <@ctx.i18n text = "订单号"/>：
               <input type="text" name="saleCode"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "销售员"/>：
               <input type="text" name="saleUserid"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "销售订单编号"/>：
               <input type="text" name="saleOrderNumber"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "车辆识别号"/>：
               <input type="text" name="outCarVin"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "车型"/>：
               <input type="text" name="outCarVehicle"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "联系人"/>：
               <input type="text" name="orderCarContacts"/> </label>
            </li>
          <li class="select-time">
             <label> <@ctx.i18n text = "计划入厂时间"/>： </label>
            <input type="text" class="time-input" name="OrderCarPlanInTime"/>
        </li>
          <li class="select-time">
             <label> <@ctx.i18n text = "最晚交车时间"/>： </label>
            <input type="text" class="time-input" name="OrderCarLastDeliveryTime"/>
        </li>
           <li>
              <label> <@ctx.i18n text = "车辆位置"/>：
               <input type="text" name="orderCarPosition"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "车辆损失图片"/>：
               <input type="text" name="orderCarLossFilepath"/> </label>
            </li>
          <li class="select-time">
             <label> <@ctx.i18n text = "预计交车时间"/>： </label>
            <input type="text" class="time-input" name="CommissionerPlanGiveTime"/>
        </li>
           <li>
              <label> <@ctx.i18n text = "维修方法"/>：
               <input type="text" name="commissionerRepairMethod"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "报价"/>：
               <input type="text" name="commissionerOffer"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "报价单"/>：
               <input type="text" name="commissionerOfferFilepath"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "入场检查文件"/>：
               <input type="text" name="maintenanceCheckFilepath"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "维修状态"/>：
               <input type="text" name="maintenanceStatus"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "维修结算单"/>：
               <input type="text" name="maintenanceSettlementFilepath"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "总价"/>：
               <input type="text" name="maintenanceTotalPrice"/> </label>
            </li>
        <li>
          <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;&nbsp;<@ctx.i18n text = "查询"/></a>
          <a class="btn btn-warning btn-rounded btn-sm" onclick="opt.form.reset()"><i class="fa fa-refresh"></i>&nbsp;<@ctx.i18n text = "重置"/></a>
       </li>
      </ul>
   </div>
  </@form.form>
 </div>
  <@table id="bootstrap-table">
    <@shiro.hasPermission name="bpm:maintenance:add">
                    <a class="btn btn-success" onclick="opt.operate.add()"><i class="fa fa-plus"></i>&nbsp;<@ctx.i18n text = "新增"/></a>
    </@shiro.hasPermission>
    <@shiro.hasPermission name="bpm:maintenance:edit">
        <a class="btn btn-primary single disabled" onclick="opt.operate.edit()"><i class="fa fa-pencil-square-o"></i>&nbsp;<@ctx.i18n text = "修改"/></a>
    </@shiro.hasPermission>
    <@shiro.hasPermission name="bpm:maintenance:del">
        <a class="btn btn-danger multiple disabled" onclick="opt.operate.delAll()">
            <i class="fa fa-remove"></i> <@ctx.i18n text = "删除"/>
        </a>
    </@shiro.hasPermission>
   </@table>
  <div>
</div>
<@footer>
<script>
    var editFlag = "${permission.hasPermi("bpm:maintenance:edit")}";
    var listFlag = "${permission.hasPermi("bpm:maintenance:add")}";
    var delFlag = "${permission.hasPermi("bpm:maintenance:del")}";
    var visible = ${permission.isPermitteds("bpm:maintenance:edit,bpm:maintenance:del,bpm:maintenance:add")?string('true', 'false')};
    var prefix = baseURL + "bpm/maintenance";

    $(function() {
        var options = {
            url: prefix + "/list",
            addUrl: prefix + "/add",
            editUrl: prefix + "/edit/{id}",
            delUrl: prefix + "/del",
            modalName: "维修",
            uniqueId:    'id'/* 唯一ID */                                                                     ,
            escape: true,            /* 分页设置 */
            showPageGo: true,       /* 分页设置 */
            pageSize: 10,            /* 分页设置 */
            pageList: [10, 30, 50], /* 分页设置 */
            columns: [
                {title: $.i18n.prop("序号"), width: 5, align: "center", formatter: function (value, row, index) {
                            return $.table.serialNumber(index);
                }}
                ,{field : 'id',title : '<@ctx.i18n text = "主键"/>',visible: false}
               ,{field : 'saleCode',title : '<@ctx.i18n text = "订单号"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
                     ,{field : 'saleUserid',title : '<@ctx.i18n text = "销售员"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'saleOrderNumber',title : '<@ctx.i18n text = "销售订单编号"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'outCarVin',title : '<@ctx.i18n text = "车辆识别号"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'outCarVehicle',title : '<@ctx.i18n text = "车型"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'orderCarContacts',title : '<@ctx.i18n text = "联系人"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'orderCarPlanInTime',title : '<@ctx.i18n text = "计划入厂时间"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'orderCarLastDeliveryTime',title : '<@ctx.i18n text = "最晚交车时间"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'orderCarPosition',title : '<@ctx.i18n text = "车辆位置"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
               ,{field : 'orderCarLossFilepath',title : '<@ctx.i18n text = "车辆损失图片"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'commissionerPlanGiveTime',title : '<@ctx.i18n text = "预计交车时间"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'commissionerRepairMethod',title : '<@ctx.i18n text = "维修方法"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'commissionerOffer',title : '<@ctx.i18n text = "报价"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'commissionerOfferFilepath',title : '<@ctx.i18n text = "报价单"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'maintenanceCheckFilepath',title : '<@ctx.i18n text = "入场检查文件"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'maintenanceStatus',title : '<@ctx.i18n text = "维修状态"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'maintenanceSettlementFilepath',title : '<@ctx.i18n text = "维修结算单"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'maintenanceTotalPrice',title : '<@ctx.i18n text = "总价"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
                ,{title:"<@ctx.i18n text = "操作"/>",align: 'center',visible:visible,formatter: function(value, row, index) {
                        var actions = [];
                          actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="opt.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + delFlag + '" href="javascript:void(0)" onclick="opt.operate.del(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        actions.push('<a class="btn btn-danger btn-xs ' + delFlag + '" href="javascript:void(0)" onclick="showDetial(\'' + row.id + '\')"><i class="fa fa-remove"></i>查看</a>');
                         return actions.join('');
                    }
                }

                ]
            };
            $.table.init(options);
        });
    function showDetial(id) {
        opt.modal.open("查看",prefix+"/view1/"+id);
    }
</script>
</@footer>
</@pageTheme>